#include<stdio.h>
#include<malloc.h>
#include<string.h>

typedef struct Person
{
    char name[20];
    char phone[20];
    char address[30];
}Person,*pPerson;

typedef struct Time
{
    int year;
    int month;
    int day;
}Time,*pTime;

typedef struct courierBill
{
    int id;
    Person sender,receiver;
    char sendCity[20],receiveCity[20];
    char serviceCompany[20];
    Time send,receive;
    int price;
}Paper,*pPaper;

Paper personSplit(char temp[ ],pPerson now)
{
    int i=0,j=0;
    for(;i<strlen(temp);i++){
        if(temp[i]==':'){
            i++;
            break;
        }
    }
    for(;i<strlen(temp);i++){
        if(temp[i]==','){
            now->name[j++]='\0';
            j=0;
            i=i+1;
            break;
        }
        now->name[j++]=temp[i];
    }
    for(;i<strlen(temp);i++){\
        if(temp[i]==','){
            now->phone[j++]='\0';
            j=0;
            i=i+1;
            break;
        }
        now->phone[j++]=temp[i];
    }
    for(;i<strlen(temp);i++){
        now->address[j++]=temp[i];
    }
    now->address[j++]='\0';
}

int main()
{
    pPaper now;
    now=(pPaper)malloc(sizeof(Paper));
    scanf("快递单号:%d",&(now->id));
    getchar();
    char temp[100];
    gets(temp);
    personSplit(temp,&(now->sender));
    gets(temp);
    personSplit(temp,&(now->receiver));
    scanf("始发城市:%s",now->sendCity);
    getchar();
    scanf("目的城市:%s",now->receiveCity);
    getchar();
    scanf("快递服务商:%s",now->serviceCompany);
    getchar();
    scanf("发送时间:%d.%d.%d",&(now->send.year),&(now->send.month),&(now->send.day));
    getchar();
    scanf("接收时间:%d.%d.%d",&(now->receive.year),&(now->receive.month),&(now->receive.day));
    getchar();
    scanf("快递价格:%d",&(now->price));

    printf("快递单号:%d\n",now->id);
    printf("发货方:%s,%s,%s\n",now->sender.name,now->sender.phone,now->sender.address);
    printf("接收方:%s,%s,%s\n",now->receiver.name,now->receiver.phone,now->receiver.address);
    printf("始发城市:%s\n",now->sendCity);
    printf("目的城市:%s\n",now->receiveCity);
    printf("快递服务商:%s\n",now->serviceCompany);
    printf("发送时间:%d.%02d.%02d\n",now->send.year,now->send.month,now->send.day);
    printf("接收时间:%d.%02d.%02d\n",now->receive.year,now->receive.month,now->receive.day);
    printf("快递价格:%d\n",now->price);
}